package fr.generali.accueilclient.gwt.showcase.client.form;

import javax.validation.Validator;

import com.google.gwt.core.client.GWT;
import com.google.gwt.validation.client.AbstractGwtValidatorFactory;
import com.google.gwt.validation.client.GwtValidation;
import com.google.gwt.validation.client.impl.AbstractGwtValidator;

/**
 * {@link AbstractGwtValidatorFactory} that creates the specified
 * {@link GwtValidator}.
 */
public final class AppValidatorFactory extends AbstractGwtValidatorFactory {

	/**
	 * Validator marker for the Validation Sample project. Only the classes listed
	 * in the {@link GwtValidation} annotation can be validated.
	 */
	@GwtValidation(value = ValidableObject.class/*, groups = { Default.class, ClientGroup.class }*/)
	public interface GwtValidator extends Validator {
	}

	@Override
	public AbstractGwtValidator createValidator() {
		return GWT.create(GwtValidator.class);
	}
}